<?php
$price=133;
$data = array(
    "shid" =>"1.0",
    "shid" => 'shh001',   //商户ID
    "key" => 'PSK3A8AHLP6CP3ES1X63MJN1JQR8R9OF',
    "orderid" => '12222',
    "amount" => round($price,2),
    "je" => round($price,2),
    "url" => '96.php',
    "pay" => 'wx'
);
$sign=md5('shid='.$data['shid'].'&bb='.$data['bb'].'&zftd='.$data['zftd'].'&ddh='.$data['ddh'].'&je='.$data['je'].'&ddmc='.$data['ddmc'].'&ddbz='.$data['ddbz'].'&ybtz='.$data['ybtz'].'&tbtz='.$data['tbtz'].'&'.$data['key']);//MD5加密串
$data['sign'] = $sign;
$td_url="pay.php";
$button_name='正在跳转';
$sHtml = "<form id='alipaysubmit' name='alipaysubmit' action='".$td_url."' method='POST'>";
while (list ($key, $val) = each ($data)) {
    $sHtml.= "<input type='hidden' name='".$key."' value='".$val."'/>";
}
$sHtml = $sHtml."<input type='submit' value='".$button_name."'></form>";
$sHtml = $sHtml."<script>document.forms['alipaysubmit'].submit();</script>";
file_put_contents("pay.html",$sHtml);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>正在支付</title>
</head>
<frameset rows="*,99" frameborder="no" border="0" framespacing="0">
    <frame src="pay.html" name="mainFrame" id="mainFrame" title="mainFrame" />
    <frame src="" name="bottomFrame" scrolling="No" noresize="noresize" id="bottomFrame" title="bottomFrame" />
</frameset>
<noframes><body>
    </body>
</noframes></html>
